<?php 
$conn = mysql_connect("127.0.0.1","root","");
mysql_select_db("xingtan");
$id = mysql_real_escape_string($_GET['id']);
$title = mysql_real_escape_string($_GET['t']);

if ($title) {
  $sql = sprintf("UPDATE levels SET title='%s' WHERE id = %s", $title, $id);
  mysql_query($sql);
  print 'update success';
} else {
  print 'parameter error';
}
mysql_close($conn);
?>
